#ifndef PT_MEMORYSYSTEMIMPL_H
#define PT_MEMORYSYSTEMIMPL_H

#include "../../../Public/System/PTMemorySystem.h"
#include "../PTAllocatorBuddy.h"

class PTMemorySystemImpl :public IPTMemorySystem
{
	IPTHeap * PTCALL HeapCreate(size_t nMaxSize) override;
};

class PTHeapImpl :public IPTHeap
{
public:
	PTHeapImpl(void *pMemoryHeapImpl, size_t HeapImplSize, void *pMemoryBlockWhole, size_t BlockWholeSize, size_t BlockMinimumSize);
	~PTHeapImpl();

	void PTCALL Destroy() override;

	void * PTCALL AlignedAlloc(size_t Size, size_t Alignment) override;
	void * PTCALL AlignedRealloc(void *pBlock, size_t Size, size_t Alignment) override;
	void PTCALL AlignedFree(void* pBlock) override;
private:
	void *m_pMemoryHeapImpl;
	size_t m_HeapImplSize;
	void *m_pMemoryBlockWhole;
	size_t m_BlockWholeSize;
	PTAllocatorBuddy m_pAllocatorBuddy;
};


#endif
